import '../item_style.dart';
import '../tooltip.dart';
import 'series.dart';

import 'package:json_annotation/json_annotation.dart';

part 'scatter_series.g.dart';

@JsonSerializable(includeIfNull: false, explicitToJson: true)
class ScatterEmphasis {
  var scale;
  var focus;
  var blurScope;
  SeriesLabel? label;
  LabelLine? labelLine;
  ItemStyle? itemStyle;

  ScatterEmphasis(
      {this.scale,
      this.focus,
      this.blurScope,
      this.label,
      this.labelLine,
      this.itemStyle});

  factory ScatterEmphasis.fromJson(Map<String, dynamic> json) =>
      _$ScatterEmphasisFromJson(json);

  Map<String, dynamic> toJson() => _$ScatterEmphasisToJson(this);
}

@JsonSerializable(includeIfNull: false, explicitToJson: true)
class ScatterBlurSelectEmphasis {
  SeriesLabel? label;
  LabelLine? labelLine;
  ItemStyle? itemStyle;

  ScatterBlurSelectEmphasis({this.label, this.labelLine, this.itemStyle});

  factory ScatterBlurSelectEmphasis.fromJson(Map<String, dynamic> json) =>
      _$ScatterBlurSelectEmphasisFromJson(json);

  Map<String, dynamic> toJson() => _$ScatterBlurSelectEmphasisToJson(this);
}

@JsonSerializable(includeIfNull: false, explicitToJson: true)
class ScatterData {
  var name;
  var value;
  var symbol;
  var symbolSize;
  var symbolRotate;
  var symbolKeepAspect;
  var symbolOffset;
  SeriesLabel? label;
  LabelLine? labelLine;
  ItemStyle? itemStyle;
  ScatterBlurSelectEmphasis? emphasis;
  ScatterBlurSelectEmphasis? blur;
  ScatterBlurSelectEmphasis? select;
  Tooltip? tooltip;

  ScatterData(
      {this.name,
      this.value,
      this.symbol,
      this.symbolSize,
      this.symbolRotate,
      this.symbolKeepAspect,
      this.symbolOffset,
      this.label,
      this.labelLine,
      this.itemStyle,
      this.emphasis,
      this.blur,
      this.select,
      this.tooltip});

  factory ScatterData.fromJson(Map<String, dynamic> json) =>
      _$ScatterDataFromJson(json);

  Map<String, dynamic> toJson() => _$ScatterDataToJson(this);
}

@JsonSerializable(includeIfNull: false, explicitToJson: true)
class ScatterSeries extends Series {
  var id;
  var type = 'scatter';
  var name;
  var coordinateSystem;
  var xAxisIndex;
  var yAxisIndex;
  var polarIndex;
  var geoIndex;
  var calendarIndex;
  var legendHoverLink;
  var symbol;
  var symbolSize;
  var symbolRotate;
  var symbolKeepAspect;
  var symbolOffset;
  var large;
  var largeThreshold;
  var cursor;
  SeriesLabel? label;
  LabelLine? labelLine;
  LabelLayout? labelLayout;
  ItemStyle? itemStyle;
  ScatterEmphasis? emphasis;

  ScatterBlurSelectEmphasis? blur;
  ScatterBlurSelectEmphasis? select;

  var selectedMode;
  var progressive;
  var progressiveThreshold;
  var dimensions;
  var encode;
  var seriesLayoutBy;
  var datasetIndex;

  var zlvel;
  var z;
  var silent;

  var animation;
  var animationThreshold;
  var animationDuration;
  var animationEasing;
  var animationDelay;
  var animationDurationUpdate;
  var animationEasingUpdate;
  var animationDelayUpdate;
  Tooltip? tooltip;

  ScatterSeries(
      {this.id,
      this.name,
      this.coordinateSystem,
      this.xAxisIndex,
      this.yAxisIndex,
      this.polarIndex,
      this.geoIndex,
      this.calendarIndex,
      this.legendHoverLink,
      this.symbol,
      this.symbolSize,
      this.symbolRotate,
      this.symbolKeepAspect,
      this.symbolOffset,
      this.large,
      this.largeThreshold,
      this.cursor,
      this.label,
      this.labelLine,
      this.labelLayout,
      this.itemStyle,
      this.emphasis,
      this.blur,
      this.select,
      this.selectedMode,
      this.progressive,
      this.progressiveThreshold,
      this.dimensions,
      this.encode,
      this.seriesLayoutBy,
      this.datasetIndex,
      this.zlvel,
      this.z,
      this.silent,
      this.animation,
      this.animationThreshold,
      this.animationDuration,
      this.animationEasing,
      this.animationDelay,
      this.animationDurationUpdate,
      this.animationEasingUpdate,
      this.animationDelayUpdate,
      this.tooltip});

  factory ScatterSeries.fromJson(Map<String, dynamic> json) =>
      _$ScatterSeriesFromJson(json);

  Map<String, dynamic> toJson() => _$ScatterSeriesToJson(this);
}
